<h1 id="links">Links</h1>

<h3 id="example-459">Example 459</h3>

<p><a href="/uri" title="title">link</a></p>

<h3 id="example-460">Example 460</h3>

<p><a href="/uri">link</a></p>

<h3 id="example-461">Example 461</h3>

<p><a href="">link</a></p>

<h3 id="example-462">Example 462</h3>

<p><a href="">link</a></p>

<h3 id="example-463">Example 463</h3>

<p>[link](/my uri)</p>

<h3 id="example-464">Example 464</h3>

<p>[link](&lt;/my uri&gt;)</p>

<h3 id="example-465">Example 465</h3>

<p>[link](foo
bar)</p>

<h3 id="example-466">Example 466</h3>

<p>[link](<foo
bar>)</p>

<h3 id="example-467">Example 467</h3>

<p><a href="(foo)">link</a></p>

<h3 id="example-4680">Example 4680</h3>

<p>ONE LEVEL of parentheses are allowed without escaping, as long as they are balanced:</p>

<p><a href="foo(bar)">link</a></p>

<h3 id="example-469">Example 469</h3>

<p><a href="foo(and(bar)">link</a></p>

<h3 id="example-470">Example 470</h3>

<p>However, if you have ANY unbalanced parentheses, you need to escape or use the &lt;...&gt; form:</p>

<p><a href="foo(and(bar)">link</a></p>

<h3 id="example-471">Example 471</h3>

<p><a href="foo):">link</a></p>

<h3 id="example-472">Example 472</h3>

<p><a href="#fragment">link</a></p>
<p><a href="http://example.com#fragment">link</a></p>
<p><a href="http://example.com?foo=3#frag">link</a></p>

<h3 id="example-473">Example 473</h3>

<p><a href="foo%5Cbar">link</a></p>

<h3 id="example-4740">Example 4740</h3>

<p><a href="foo%20b&auml;">link</a></p>

<h3 id="example-475">Example 475</h3>

<p><a href="%22title%22">link</a></p>

<h3 id="example-476">Example 476</h3>

<p><a href="/url" title="title">link</a>
<a href="/url" title="title">link</a>
<a href="/url" title="title">link</a></p>

<h3 id="example-477">Example 477</h3>

<p><a href="/url" title="title &quot;&quot;">link</a></p>

<h3 id="example-479">Example 479</h3>

<p>[link](/url &quot;title &quot;and&quot; title&quot;)</p>

<h3 id="example-480">Example 480</h3>

<p><a href="/url" title="title &quot;and&quot; title">link</a></p>

<h3 id="example-481">Example 481</h3>

<p><a href="/uri" title="title">link</a></p>

<h3 id="example-482">Example 482</h3>

<p>[link] (/uri)</p>

<h3 id="example-4830">Example 4830</h3>

<p>The link text may contain ONE LEVEL of balanced brackets, but not unbalanced ones, unless they are escaped:</p>

<p><a href="/uri">link [foo4830]</a></p>

<h3 id="example-484">Example 484</h3>

<p>[link] bar](/uri)</p>

<h3 id="example-485">Example 485</h3>

<p>[link <a href="/uri">bar</a></p>

<h3 id="example-486">Example 486</h3>

<p><a href="/uri">link [bar</a></p>

<h3 id="example-487">Example 487</h3>

<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>

<h3 id="example-488">Example 488</h3>

<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p>

<h3 id="example-493">Example 493</h3>

<p><a href="baz*">foo *bar</a></p>

<h3 id="example-494">Example 494</h3>

<p><em>foo [bar</em> baz]</p>

<h3 id="example-498">Example 498</h3>

<p><a href="/url" title="title">foo</a></p>

<h3 id="example-4990">Example 4990</h3>

<p><a href="/uri">link [foo499]</a></p>

<h3 id="example-500">Example 500</h3>

<p><a href="/uri">link [bar</a></p>

<h3 id="example-501">Example 501</h3>

<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>

<h3 id="example-502">Example 502</h3>

<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p>

<h3 id="example-5030">Example 5030</h3>

<p><a href="/uri">foo <a href="/uri">bar</a></a></p>

<h3 id="example-504">Example 504</h3>

<p><a href="/uri">foo <em>bar <a href="/uri">baz</a></em></a></p>

<h3 id="example-506">Example 506</h3>

<p><a href="/uri">foo *bar</a></p>

<h3 id="example-510">Example 510</h3>

<p><a href="/url" title="title">foo</a></p>

<h3 id="example-511">Example 511</h3>

<p><a href="/url">Толпой</a> is a Russian word.</p>

<h3 id="example-512">Example 512</h3>

<p><a href="/url">Baz</a></p>

<h3 id="example-513">Example 513</h3>

<p>[foo513] <a href="/url" title="title">bar513</a></p>

<h3 id="example-514">Example 514</h3>

<p>[foo514]
<a href="/url" title="title">bar514</a></p>

<h3 id="example-515">Example 515</h3>

<p><a href="/url1">bar</a></p>

<h3 id="example-516">Example 516</h3>

<p>[bar][foo!516]</p>

<h3 id="example-517">Example 517</h3>

<p>[foo517][ref[517]</p>
<p>[ref[517]: /uri</p>

<h3 id="example-518">Example 518</h3>

<p>[foo518][ref[bar518]518]</p>
<p>[ref[bar518]518]: /uri</p>

<h3 id="example-519">Example 519</h3>

<p>[[[foo519]]]</p>
<p>[[[foo519]]]: /url</p>

<h3 id="example-520">Example 520</h3>

<p><a href="/uri">foo</a></p>

<h3 id="example-521">Example 521</h3>

<p><a href="/uri">bar\</a></p>

<h3 id="example-522">Example 522</h3>

<p>[]</p>
<p>[]: /uri</p>

<h3 id="example-523">Example 523</h3>

<p>[
 ]</p>
<p>[
 ]: /uri</p>

<h3 id="example-524">Example 524</h3>

<p><a href="/url" title="title">foo</a></p>

<h3 id="example-525">Example 525</h3>

<p><a href="/url" title="title"><em>foo</em> bar</a></p>

<h3 id="example-526">Example 526</h3>

<p><a href="/url" title="title">Foo</a></p>

<h3 id="example-527">Example 527</h3>

<p><a href="/url" title="title">foo</a>
[]</p>

<h3 id="example-528">Example 528</h3>

<p><a href="/url" title="title">foo</a></p>

<h3 id="example-529">Example 529</h3>

<p><a href="/url" title="title"><em>foo</em> bar</a></p>

<h3 id="example-530">Example 530</h3>

<p>[<a href="/url" title="title"><em>foo</em> bar</a>]</p>

<h3 id="example-531">Example 531</h3>

<p>[[bar <a href="/url">foo531</a></p>

<h3 id="example-532">Example 532</h3>

<p><a href="/url" title="title">Foo</a></p>

<h3 id="example-533">Example 533</h3>

<p><a href="/url">foo533</a> bar</p>

<h3 id="example-534">Example 534</h3>

<p>[foo]</p>

<h3 id="example-536">Example 536</h3>

<p><a href="/url2">foo536</a></p>

<h3 id="example-537">Example 537</h3>

<p><a href="/url1">foo537</a></p>

<h3 id="example-538">Example 538</h3>

<p><a href="">foo538</a></p>

<h3 id="example-539">Example 539</h3>

<p><a href="/url1">foo539</a>(not a link)</p>

<h3 id="example-540">Example 540</h3>

<p>[foo540]<a href="/url">bar540</a></p>

<h3 id="example-541">Example 541</h3>

<p><a href="/url2">foo541</a><a href="/url1">baz541</a></p>

<h3 id="example-542">Example 542</h3>

<p>[foo542]<a href="/url1">bar542</a></p>

<h3 id="example-543">Example 543</h3>

<p><img src="/url" alt="foo543" title="title" /></p>

<h3 id="example-5440">Example 5440</h3>

<p><img src="train.jpg" alt="foo *bar*544" title="train &amp; tracks" /></p>

<h3 id="example-5450">Example 5450</h3>

<p><img src="/url2" alt="foo ![bar](/url)" /></p>

<h3 id="example-5460">Example 5460</h3>

<p><img src="/url2" alt="foo [bar](/url)" /></p>

<h3 id="example-5470">Example 5470</h3>

<p><img src="train.jpg" alt="foo *bar*547" title="train &amp; tracks" /></p>

<h3 id="example-5480">Example 5480</h3>

<p><img src="train.jpg" alt="foo *bar*" title="train &amp; tracks" /></p>

<h3 id="example-549">Example 549</h3>

<p><img src="train.jpg" alt="foo" /></p>

<h3 id="example-550">Example 550</h3>

<p>My <img src="/path/to/train.jpg" alt="foo bar" title="title" /></p>

<h3 id="example-551">Example 551</h3>

<p><img src="url" alt="foo" /></p>

<h3 id="example-552">Example 552</h3>

<p><img src="/url" alt="" /></p>

<h3 id="example-553">Example 553</h3>

<p><img src="/url" alt="foo" /></p>

<h3 id="example-554">Example 554</h3>

<p><img src="/url" alt="foo" /></p>

<h3 id="example-555">Example 555</h3>

<p><img src="/url" alt="foo" title="title" /></p>

<h3 id="example-5560">Example 5560</h3>

<p><img src="/url" alt="*foo* bar" title="title" /></p>

<h3 id="example-557">Example 557</h3>

<p><img src="/url" alt="Foo" title="title" /></p>

<h3 id="example-558">Example 558</h3>

<p><img src="/url" alt="foo" title="title" />
[]</p>

<h3 id="example-559">Example 559</h3>

<p><img src="/url" alt="foo" title="title" /></p>

<h3 id="example-5600">Example 5600</h3>

<p><img src="/url" alt="*foo* bar" title="title" /></p>

<h3 id="example-561">Example 561</h3>

<p>![[foo561]]</p>
<p>[[foo561]]: /url &quot;title&quot;</p>

<h3 id="example-562">Example 562</h3>

<p><img src="/url" alt="Foo" title="title" /></p>

<h3 id="example-563">Example 563</h3>

<p>![foo]</p>

<h3 id="example-564">Example 564</h3>

<p>!<a href="/url" title="title">foo</a></p>

